﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ComputerGraphics.Graphics;

namespace ComputerGraphics.Geometry
{
    public class Parallelogram : Polygon
    {
        public Parallelogram(Point3D origin, Point3D x, Point3D y, Texture texture)
            : base(GetPolygonVertices(origin, x, y), texture)
        {
        }

        private static List<Point3D> GetPolygonVertices(Point3D origin, Point3D x, Point3D y)
        {
            List<Point3D> vertices = new List<Point3D>();
            vertices.Add(origin);
            vertices.Add(origin + x);
            vertices.Add(origin + x + y);
            vertices.Add(origin + y);
            return vertices;
        }
    }
}
